<template>
	<view>
		<view class="imgbox">
			<view v-html="textimg">
				
			</view>
			<!-- <image v-if="id==1" mode="widthFix" src="../../static/image/rich1.jpg"></image>
			<image v-if="id==2" mode="widthFix"  src="../../static/image/rich2.jpg"></image>
			<image v-if="id==3" mode="widthFix" src="../../static/image/rich3.jpg"></image>
			<image v-if="id==4" mode="widthFix"  src="../../static/image/rich4.jpg"></image> -->
		</view>
		<!-- <view style="height: 120rpx;"></view> -->
		<!-- <view class="navbut" v-if="id==6" >
			<view @click="uploadlogistics()">上传物流信息</view>
		</view> -->
	</view>
</template>

<script>
	export default {
		data() {
			return {
				id:'',
				textimg:'',
			}
		},
		onLoad(option) {
			// this.id = option.n
			if(option.n==1){
				this.id = 14
				uni.setNavigationBarTitle({
					title: '估价'
				});
			}else if(option.n==2){
				this.id = 13
				uni.setNavigationBarTitle({
					title: '鉴定'
				});
			}else if(option.n==3){
				this.id = 6
				uni.setNavigationBarTitle({
					title: '养护'
				});
			}else if(option.n==4){
				this.id = 7
				uni.setNavigationBarTitle({
					title: '回收'
				});
			}else{
				this.id = option.id
				uni.setNavigationBarTitle({
					title: '帮助中心'
				});
			}
			this.getinfo()
		},
		methods: {
			getinfo(){
				this.$http({
					url:'api/wechat/newDetail',
					data:{
						news_id:this.id
					}
				}).then(res=>{
					this.textimg = this.$replace_Rich_text(res.data.content)
				})
			},
			uploadlogistics(){
				uni.navigateTo({
					url:'/pages/uploadlogistics/uploadlogistics'
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.imgbox{
		width: 100%;
		image{
			width: 100%;
			
		}
	}
	.navbut{
		position: fixed;
		bottom: 0;
		height: 104rpx;
		width: 100%;
		background-color: #FFF;
	>view{
		width: 690rpx;
		font-size: 32rpx;
		font-family: Source Han Sans CN-Medium, Source Han Sans CN;
		font-weight: 500;
		color: #FFFFFF;
		height: 84rpx;
		text-align: center;
		background-color: #CB9852;
		margin: 10rpx auto;
		line-height: 84rpx;
		border-radius: 83rpx ;
	}
	}

</style>
